<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 
class Linkmodel extends CI_Model
{
    var $perpage;

    function __construct()
    {
        parent::__construct();
        $perpage = 20;
    }

    public function num_of_records()
    {
        return $this->db->count_all("links");
    }

    public function get_links($limit, $start)
    {
        $this->db->limit($limit, $start);
        $query = $this->db->get("links");

        if ($query->num_rows() > 0) {
            foreach ($query->result() as $row) {
                $data[] = $row;
            }
            return $data;
        }
        
        return false;
    }

}

/* End of file linkmodel.php */
/* Location: ./application/models/linkmodel.php */